home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / Include / ds5000.md / vmMach.h < prev    next >
C/C++ Source or Header  |  1991-04-08  |  3KB  |  98 lines

  1. /*
  2.  * vmMach.h
  3.  *
  4.  *         Machine dependent virtual memory data structures and procedure
  5.  *    headers.
  6.  *
  7.  * Copyright (C) 1989 Digital Equipment Corporation.
  8.  * Permission to use, copy, modify, and distribute this software and
  9.  * its documentation for any purpose and without fee is hereby granted,
  10.  * provided that the above copyright notice appears in all copies.
  11.  * Digital Equipment Corporation makes no representations about the
  12.  * suitability of this software for any purpose.  It is provided "as is"
  13.  * without express or implied warranty.
  14.  *
  15.  * $Header: /sprite/src/kernel/vm/ds5000.md/RCS/vmMach.h,v 1.3 91/03/19 10:57:45 jhh Exp $ SPRITE (DECWRL)
  16.  */
  17.  
  18. #ifndef _VMMACH
  19. #define _VMMACH
  20.  
  21. /*
  22.  * Machine dependent data for each software segment.
  23.  */
  24. typedef struct VmMach_SegData {
  25.     int    dummy;
  26. } VmMach_SegData;
  27.  
  28. /*
  29.  * Machine dependent shared memory data
  30.  */
  31. typedef struct VmMach_SharedData {
  32.     int        *allocVector;           /* Allocated block vector. */
  33.     int         allocFirstFree;         /* First free block. */
  34. } VmMach_SharedData;
  35.  
  36. /*
  37.  * Structure to allow processes to share regions of their VA with the kernel.
  38.  */
  39.  
  40. typedef struct VmMach_KernSharedInfo {
  41.     List_Links    links;
  42.     unsigned    firstPage;        /* First virtual page in region. */
  43.     unsigned    lastPage;        /* Last virtual page in region. */
  44.     unsigned    firstPhysPage;        /* First physical page, if region
  45.                      * is in the user mapping region. */
  46.     int        flags;            /* See below. */
  47. } VmMach_KernSharedInfo;
  48.  
  49. /*
  50.  * Flags in a VmMach_KernSharedInfo.
  51.  */
  52.  
  53. #define VMMACH_KERN_SHARED_UNCACHEABLE 1    /* Is region uncacheable? */
  54.  
  55. /*
  56.  * Machine dependent data for each process.
  57.  */
  58. typedef struct VmMach_ProcData {
  59.     struct Vm_Segment    *mapSegPtr;    /* Pointer to segment which is mapped
  60.                      * into this processes address
  61.                      * space. */
  62.     unsigned int    mappedPage;    /* Page in the mapped seg where
  63.                      * the mapping begins. */
  64.     int            pid;        /* Which pid is used to map this
  65.                      * process. */
  66.     unsigned int    modPage;    /* A TLB modified fault occured on this
  67.                      * virtual page - set the modify bit
  68.                      * in the TLB entry if we try to
  69.                      * validate this VA. */
  70.     Address        sharedPtr;    /* Shared memory pointer, in case
  71.                      * shared memory is mapped.
  72.                      * This is really Vm_SegProcList*, 
  73.                      * but made address because of
  74.                      * header file problems.*/
  75.     VmMach_SharedData    sharedData;    /* Data for shared memory. */
  76.     List_Links        kernSharedList;    /* List of VA regions shared with
  77.                      * the kernel. */
  78. } VmMach_ProcData;
  79.  
  80. /*
  81.  * TLB Map.
  82.  */
  83. extern unsigned *vmMach_KernelTLBMap;
  84.  
  85. /*
  86.  * Machine dependent functions exported to machine dependent modules.
  87.  */
  88.  
  89. extern Boolean VmMach_MakeDebugAccessible _ARGS_((unsigned addr));
  90. extern ENTRY ReturnStatus VmMach_TLBFault _ARGS_((Address virtAddr));
  91. extern ReturnStatus VmMach_TLBModFault _ARGS_((Address virtAddr));
  92. extern ReturnStatus VmMach_UserMap _ARGS_((int numBytes, Address addr,
  93.     Address physAddr, Boolean cache, Address *newAddrPtr));
  94. extern ENTRY ReturnStatus VmMach_UserUnmap _ARGS_((Address addr));
  95. extern int VmMachCopyEnd _ARGS_((void));
  96.  
  97. #endif _VMMACH
  98.